﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="EditProjectTeamScreen.aspx.cs" Inherits="METU_CMT.EditProjectTeamScreen" %>
<%@ Register TagPrefix="cc1" Namespace="BunnyBear" Assembly="msgBox" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Table runat="server" Width="100%" HorizontalAlign="Center" CssClass="chp-grid" style="font-size: 15px; margin-top:50px;">
        <asp:TableRow ID="TableRow1" runat="server">
            <asp:TableCell runat="server">
                <asp:Table runat="server" Width="100%">
                    <asp:TableRow runat="server">
                        <asp:TableCell runat="server">Teams</asp:TableCell>
                        <asp:TableCell runat="server">
                            <asp:DropDownList runat="server" ID="ddlTeams" DataValueField="TeamId" DataTextField="TeamName" CssClass="chp-select" />
                        </asp:TableCell>
                    </asp:TableRow>
                    <asp:TableRow ID="TableRow2" runat="server">
                        <asp:TableCell ID="TableCell2" runat="server">Students</asp:TableCell>
                        <asp:TableCell ID="TableCell3" runat="server">
                            <asp:ListBox runat="server" ID="lstStudents" DataValueField="UserId" DataTextField="UserName" CssClass="chp-text-area"/>
                        </asp:TableCell>
                    </asp:TableRow>
                    <asp:TableRow ID="TableRow3" runat="server">
                        <asp:TableCell ID="TableCell4" runat="server"></asp:TableCell>
                        <asp:TableCell ID="TableCell5" runat="server">
                            <asp:Button runat="server" ID="btnAdd" OnClick="OnBtnAddClicked" Text="Add" CssClass="chp-button-red" /></asp:TableCell>
                    </asp:TableRow>
                    <asp:TableRow ID="TableRow4" runat="server">
                        <asp:TableCell ID="TableCell6" runat="server"></asp:TableCell>
                        <asp:TableCell ID="TableCell7" runat="server">
                            <asp:LinkButton ID="LinkButton1" runat="server" Text="Edit Teams" OnClick="OnLnkBtnEditTeamsClicked"></asp:LinkButton>
                        </asp:TableCell>
                    </asp:TableRow>
                </asp:Table>
            </asp:TableCell>
            <asp:TableCell ID="TableCell1" runat="server">
                <asp:GridView runat="server" ID="dtgTeamDetails" OnRowCommand="OnDtgTeamDetailsRowCommand" CssClass="chp-grid"
                    AutoGenerateColumns="false" ShowHeaderWhenEmpty="true">
                    <Columns>
                        <asp:BoundField DataField="TeamName" HeaderText="Team Name" />
                        <asp:BoundField DataField="TeamMemberName" HeaderText="Team Member Name" />
                        <asp:TemplateField HeaderText="Action">
                            <ItemTemplate>
                                <asp:LinkButton runat="server" ID="lnkBtnDelete" CommandName="RemoveAssignment" CommandArgument='<%# Bind("TeamId") %>'
                                    Text="Remove Assigment"></asp:LinkButton>
                                <asp:HiddenField Value='<%# Bind("StudentId") %>' ID="hfId" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </asp:TableCell>
        </asp:TableRow>
    </asp:Table>
    <cc1:msgBox ID="MsgBox1" runat="server"></cc1:msgBox>
</asp:Content>
